<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>用户中心</title>
    <meta name="description" content="这是一个 index 页面">
    <meta name="keywords" content="index">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="icon" type="image/png" href="/resources/i/favicon.png">
    <link rel="apple-touch-icon-precomposed" href="/resources/i/app-icon72x72@2x.png">
    <meta name="apple-mobile-web-app-title" content="Amaze UI" />
    <link rel="stylesheet" href="/resources/css/amazeui.min.css" />
    <script src="/resources/js/jquery.min.js"></script>

    <style type="text/css">
        html,body{
            height: 100%;
        }
        .active{
            background-color:#dddddd;
            color:red;
        }
        .am-list li{
            border:none;
        }
    </style>

</head>

<body>
<!-- 顶部 -->
    <%--<div style="background-color:#82a6f5;height:8%;">--%>
        <%--<span style="line-height:50px;font-size:16px;position:absolute;left:45%;color:white;">用户中心</span>--%>
    <%--</div>--%>
<!-- 中间 -->
<div id="center" style="width:100%;height:92%;overflow:auto;">
    <a href="#" style="display:none;"  id="vipTryFalse"></a>

    <div style="width:150px;height:150px;margin-left:auto;margin-right:auto;">
        <img src="${photo}" alt="头像" onerror="this.src='/resources/img/user_img.jpg'"  class="am-img-thumbnail am-circle" style="width:100%;height:100%;">
    </div>
    <div style="text-align:center;margin:10px 0;">
        <span>${userName}</span>
    </div>

    <%--<div class="am-g">--%>
        <%--<div class="am-u-sm-5 am-u-sm-centered" style="margin-bottom:20px;width:150px;height:150px;">--%>
            <%--<img src="${photo}" alt="头像" onerror="this.src='/resources/img/user_img.jpg'"  class="am-img-thumbnail am-circle" style="width:100%;height:100%;">--%>
            <%--<span style="display: inline-block;text-align: center;width: 100%">${userName}</span>--%>
        <%--</div>--%>
    <%--</div>--%>
    <div class="am-g">
        <c:choose>
            <c:when test="${vipTrueFalse == true}">
                <i class="am-icon-cny am-u-sm-6">
                 会员:${vipName}
                </i>
            </c:when>
            <c:when test="${vipTrueFalse == false}">
                <a class="am-icon-cny am-u-sm-6" href="${sessionScope.activeurl.url}">会员${vipName}</a><!----填写充值路径----->
            </c:when>
        </c:choose>
        <i class="am-icon-cny am-u-sm-4">余额:${balancebalance}</i>
    </div>
    <ul class="am-list am-list-static am-list-border am-list-striped"  style="margin: 2px">
        <li></li>
         <li onclick="myOrder(${vipTrueFalse},'${sessionScope.activeurl.url}')">我的调理</li>
        <li></li>
        <li><a style="color: black;padding: 0px" href="/feed/back">家长反馈</a></li>
        <li></li>
        <c:if test="${vipTrueFalse}">
            <li><a style="color: black;padding: 0px" href="/pr/pre">一键预约</a></li>
            <li></li>
        </c:if>
      
        <li onclick="myWhat(${vipTrueFalse},'${sessionScope.activeurl.url}')">我的心得</li>
        <li></li>
        <li><a style="color: black;padding: 0px" href="/feed/get">查看反馈</a></li>
        <li></li>
        <li onclick="myModif()">修改密码</li>
        <li></li>
        
        <li onclick=""><a href="/logout">退出登录</a></li>
    </ul>
</div>
<!-- 底部 -->
    <div class="am-g" style="background-color:rgba(255,255,255,0);border-color:#dddddd;height:8%;">

                <div id="company" class="am-u-sm-3" style="height:100%;border-radius:10px;">
                    <a href="#" style="display:block;color:#929292;margin-top:10px;"><b style="margin-left:30%;">社区</b></a>
                </div>
        <div id="news" class="am-u-sm-3" style="height:100%;border-radius:10px;">
            <a href="#" style="display:block;color:#929292;margin-top:10px;"><b style="margin-left:30%;">新闻</b></a>
        </div>
        <div id="stud" class="am-u-sm-3" style="height:100%;border-radius:10px;">
                    <a href="#" style="display:block;color:#929292;margin-top:10px;;"><b style="margin-left:30%;">学习</b></a>
                </div>
                <div id="content" class="am-u-sm-3 active" style="height:100%;border-radius:10px;">
                    <a href="#" style="display:block;color:#929292;margin-top:10px;"><b style="margin-left:30%;">我的</b></a>
                </div>
                <%--<div id="news" class="am-u-sm-3" style="height:100%;border-radius:10px;">--%>
                    <%--<a href="#" style="display:block;color:#929292;margin-top:10px;"><b style="margin-left:30%;">预留</b></a>--%>
                <%--</div>         --%>
        </div>
    <script>
        $(document).ready(function(e){
            $("#company").click(function(){
                $(this).find("a").attr("href",'/index');
            });
            $("#stud").click(function(){
                $(this).find("a").attr("href",'/s/study');
            });
            $("#content").click(function(){
                $(this).find("a").attr("href",'#');
            });
            $("#news").click(function(){
                $(this).find("a").attr("href",'/res/reserved');
            });
        })

        $(document).ready(function () {
            <%--var t=${vipTrueFalse};--%>
            <%--if ( t=="false" ){--%>
                <%--var vipName=document.getElementById("vipName");--%>
                <%--vipName.innerHTML="点击激活会员";--%>
                <%--vipName.style.color="red";--%>
                <%--vipName.style.display="block";--%>
            <%--} else {--%>
                <%--alert("会尽快"+t);--%>
            <%--}--%>
        })
        //订单
        function myOrder(vipTrueFalse,url) {
                if (vipTrueFalse==true){
                    window.location.href="/c/order";
                } else {
                    var vipTryFalse=document.getElementById("vipTryFalse");
                    vipTryFalse.innerHTML="非会员不能查看,点击激活会员";
                    vipTryFalse.style.color="red";
                    vipTryFalse.style.display="block";
                    vipTryFalse.setAttribute("href",url);
                }

        }
        //心得
        function myWhat(vipTrueFalse,url) {
            if (vipTrueFalse==true){
                window.location.href="/e/experience";
            } else {
                var vipTryFalse=document.getElementById("vipTryFalse");
                vipTryFalse.innerHTML="非会员不能查看,点击激活会员";
                vipTryFalse.style.color="red";
                vipTryFalse.style.display="block";
                vipTryFalse.setAttribute("href",url);
            }
        }
        //修改资料
        function myModif() {
            window.location.href="/mo/modifyInfo"
        }

    </script>
</body>

</html>
